;;; init-lua.el --- lua config -*- lexical-binding:t -*-
;;; Commentary:
;;; Code:

(use-package lua-mode
  :defer t
  :delight "Λ "
  :mode ("\\.lua\\'" . lua-mode)
  :interpreter ("lua" . lua-mode)
  :config
  (setq lua-indent-level 2)
  (setq lua-indent-nested-block-content-align nil)
  (setq lua-indent-close-paren-align nil)
  (setq lua-indent-string-contents t)
  )

;; lua-mode
(leader-key lua-mode-map
  "m" '(:ignore t :wk "lang")
  "mx" '(quickrun :wk "run")
  "mb" '(lua-send-buffer :wk "send buffer")
  "ml" '(lua-send-current-line :wk "send line")
  "mf" '(lua-send-defun :wk "send defun")
  "mr" '(lua-send-region :wk "send region")
  "mz" '(lua-show-process-buffer :wk "process buffer")
  )

(provide 'init-lua)
;;; init-lua.el ends here
